package org.hk.kg.finance.stutype.service;

import java.util.List;
import java.util.Map;

import org.hk.kg.db.IDBService;
import org.hk.kg.db.annotations.StatusMsg;
import org.hk.kg.db.annotations.Transaction;
import org.hk.kg.finance.FinanceConstants;

public interface IStuTypeService extends IDBService{
	/**
	 * 创建新的生源类型
	 * @param typeName 生源类型名
	 * @param desc 生源描述
	 * @return
	 */
	@Transaction
	@StatusMsg(
			beginMsg=FinanceConstants.MSG_STUTYPE_CREATE_BEGIN,
			endMsg=FinanceConstants.MSG_STUTYPE_CREATE_END,
			errMsg=FinanceConstants.MSG_STUTYPE_CREATE_ERROR
			)
	public boolean createStuType(String typeName,String desc);
	
	/**
	 * 查询处所有的生源组
	 * @return
	 */
	@StatusMsg(
			beginMsg=FinanceConstants.MSG_STUTYPE_QUERY_BEGIN,
			endMsg=FinanceConstants.MSG_STUTYPE_QUERY_END,
			errMsg=FinanceConstants.MSG_STUTYPE_QUERY_ERROR
			)
	public List<Map> queryStuTypes();
	
	/**
	 * 删除生源组
	 * @param typeIds
	 * @return
	 */
	@Transaction
	@StatusMsg(
			beginMsg=FinanceConstants.MSG_STUTYPE_DELETE_BEGIN,
			endMsg=FinanceConstants.MSG_STUTYPE_DELETE_END,
			errMsg=FinanceConstants.MSG_STUTYPE_DELETE_ERROR
			)
	public boolean deleteStuTypes(Object[] typeIds);
	
	/**
	 * 查询指定id的生源组
	 * @param typeId
	 * @return
	 */
	@StatusMsg(
			beginMsg=FinanceConstants.MSG_STUTYPE_QRY_ONE_BEGIN,
			endMsg=FinanceConstants.MSG_STUTYPE_QRY_ONE_END,
			errMsg=FinanceConstants.MSG_STUTYPE_QRY_ONE_ERROR
			)
	public Map getStuTypeById(int typeId);
	
	/**
	 * 修改生源类型
	 * @param typeId
	 * @param typeName
	 * @param typeDesc
	 * @return
	 */
	@Transaction
	@StatusMsg(
			beginMsg=FinanceConstants.MSG_STUTYPE_UPT_BEGIN,
			endMsg=FinanceConstants.MSG_STUTYPE_UPT_END,
			errMsg=FinanceConstants.MSG_STUTYPE_UPT_ERROR
			)
	public boolean modifyStuType(int typeId,String typeName,String typeDesc);
}
